package com.gh.plugin.main.dialog.main.custom;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Rect;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.widget.TextView;

@SuppressLint({"AppCompatCustomView"})
public class MarqueeTextView extends TextView {
    public boolean b;

    public MarqueeTextView(Context arg1, AttributeSet arg2) {
        super(arg1, arg2);
        this.b = true;
    }

    @Override  // android.view.View
    public boolean isFocused() {
        return this.b;
    }

    @Override  // android.widget.TextView
    public void onFocusChanged(boolean arg1, int arg2, Rect arg3) {
        super.onFocusChanged(this.b, arg2, arg3);
    }

    @Override  // android.widget.TextView
    public void onWindowFocusChanged(boolean arg1) {
        super.onWindowFocusChanged(this.b);
    }

    public void setMarqueeEnable(boolean arg2) {
        if(this.b != arg2) {
            this.b = arg2;
            this.setEllipsize(arg2 ? TextUtils.TruncateAt.MARQUEE : TextUtils.TruncateAt.END);
            this.onWindowFocusChanged(arg2);
        }
    }
}

